<html>
<head>
<script type="text/javascript">
		var aJaxURL	= "server-side/Archive.action.php";		//server side folder url
		var tName	= "report";
		var tbName			= "tabs";
		$(document).ready(function () {
			GetTabs(tbName);
			GetDate("search_start");
			GetDate("search_end");
			LoadTable();
		});
		function LoadTable(){
			var tab     = GetSelectedTab(tbName);
			var start	= $("#search_start").val();
	    	var end		= $("#search_end").val();
			var total = [5,6,7, 8, 9, 10,11,12,13,14,15];
			var r=15;
			if (tab == 1) {total=[6]; r=6;}
			GetDataTable_r(tName+'-'+tab, aJaxURL, "get_list", r, "start=" + start + "&end=" + end+'&tab='+tab, 0, "", 1, "desc", total);
         }
	    $(document).on("change", "#search_start", function () {
	    	LoadTable();
	    });
	    $(document).on("change", "#search_end", function () {
	    	LoadTable();
	    });
	    $(document).on("tabsactivate", "#tabs", function() {
	    	LoadTable();
	    });

</script>
<style type="text/css">
.display tr td{
 	text-align: center;
  }
.display tr td:nth-child(16){
  	text-align: right;
  }
.display tr th:nth-child(16){
  	text-align: right;
  }
.display tr td:nth-child(7){
  	text-align: right;
  }
</style>
</head>

<body>
<div id="tabs" style="width: 820px; margin: 0 auto; min-height: 768px;">
	<ul>
		<li><a href="#tab-0">კარტრიჯების ისტორია </a></li>
		<li><a href="#tab-1">პრინტერების ისტორია</a></li>
	</ul>
    <div id="" class="ex_highlight_row clear_box">
        <div id="container" style="width:width: 1060px">
                    	<div id="button_area">
	            	<div class="left" style="width: 250px;">
	            		<label for="search_start" class="left" style="margin: 5px 0 0 9px;">დასაწყისი</label>
	            		<input type="text" name="search_start" id="search_start" class="inpt right" style="padding: 0px !important; height: 25px !important;"/>
	            	</div>
	            	<div class="right" style="width: 260px;">
	            		<label for="search_end" class="left" style="margin: 5px 0 0 9px;">დასასრული</label>
	            		<input type="text" name="search_end" id="search_end" class="inpt right" style="padding: 0px !important; height: 25px !important;"/>
            		</div>
       </div>
<div id="tab-0" >
            <div id="dynamic">
            </div>
                <table class="display" style="width: auto;" id="report-0">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 120px;">შტრიხკოდი</th>
                            <th style="width: 120px;">მოდელი</th>
                            <th style="width: 80px;">ბარათი</th>
                            <th style="width: 120px;">თარიღი</th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">საგარანტიო</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">ტონერი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">ბარაბანი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">მაგნიტური ლილვი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">რეზინის ლილვი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">გამწმ.რაკელი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">დოზ.რაკელი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">ჩიპი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">კორპუსი</span></th>
                            <th style="vertical-align: bottom !important; width: 20px; height: 140px;  padding-right:5px !important;"><span class="rotate style1" style="font-size:10pt !important;">სერვისის გარეშე</span></th>
                            <th style="width: 70px;">თანხა</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" id="search_type" name="search_type" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" id="search_code" name="search_code" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                               <input type="text" id="search_model" name="search_model" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                               <input type="text" id="search_letter" name="search_letter" value="ფილტრი" class="search_init" />
                            </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                            <th> </th>
                        </tr>
                    </thead>
                    <tfoot class="center_price">
                        <tr>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th><p style="text-align:right !important; font-weight:bold !important;">ჯამი<br />სულ ჯამი</p></th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                        </tr>
                    </tfoot>
                </table>
 </div>
<div id="tab-1">

                <table class="display" style="width: auto;" id="report-1">
                    <thead>
                        <tr id="datatable_header">
                            <th>ID</th>
                            <th style="width: 150px;">სერიული N</th>
                            <th style="width: 110px;">მოდელი</th>
                            <th style="width: 70px;">ბარათი</th>
                            <th style="width: 101px;">თარიღი</th>
                            <th style="width: 155px;">შესრულებული<br>სამუშაო</th>
                            <th style="width: 60px;">თანხა</th>
                        </tr>
                    </thead>
                    <thead>
                        <tr class="search_header">
                            <th class="colum_hidden">
                            	<input type="text" name="search_id" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" id="search_code" name="search_code" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                               <input type="text" id="search_model" name="search_model" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                               <input type="text" id="search_letter" name="search_letter" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" id="search_date" name="search_date" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                                <input type="text" id="search_work" name="search_work" value="ფილტრი" class="search_init" />
                            </th>
                            <th>
                            </th>

                        </tr>
                    </thead>
                    <tfoot>
                        <tr>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th>&nbsp;</th>
                            <th><p align="right">ჯამი:<br/>სულ ჯამი:</th>
                            <th>&nbsp;</th>
                        </tr>
                    </tfoot>
                </table>
                </div>

            <div class="spacer">
            </div>
        </div>
    </div>
</div>
    <!-- jQuery Dialog -->

</body>
</html>